//
//  DTItem.h
//  DayToDo
//
//  Created by karry on 2021/1/18.
//

#import <Foundation/Foundation.h>



@class DTItem;

typedef void(^DTItemHandler)(DTItem *item);

@interface DTItem : NSObject

@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *detailTitle;

@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) UIImage *selectedImage;
@property (nonatomic, assign) NSInteger tag;
@property (nonatomic, assign) BOOL selected;
@property (nonatomic, strong) id userInfo;
@property (nonatomic, strong) NSArray *items;
@property (nonatomic,strong) NSString *identifier;

@property (nonatomic, strong) NSData *data;

@property (nonatomic, copy) DTItemHandler handler;

+ (instancetype)itemWithTitle:(NSString *)title
                        image:(UIImage *)image
                          tag:(NSInteger)tag
                   identifier:(NSString *)identifier
                       handle:(DTItemHandler)handler;

+ (instancetype)itemWithTitle:(NSString *)title
                  detailTitle:(NSString *)detailTitle
                        image:(UIImage *)image
                          tag:(NSInteger)tag
                   identifier:(NSString *)identifier
                       handle:(DTItemHandler)handler;

@end
